package com.hospital.workstation.service;

import com.hospital.common.core.domain.R;
import com.hospital.workstation.domain.MedicationRecord;
import com.hospital.workstation.domain.vo.MedicationRecordVo;
import com.hospital.workstation.domain.bo.MedicationRecordBo;
import com.hospital.common.core.page.TableDataInfo;
import com.hospital.common.core.domain.PageQuery;

import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;

/**
 * 药历首页信息Service接口
 *
 * @author whb
 * @date 2023-02-13
 */
public interface IMedicationRecordService {

    /**
     * 查询药历首页信息
     */
    MedicationRecordVo queryById(Long id);

    /**
     * 查询药历首页信息列表
     */
    TableDataInfo<MedicationRecordVo> queryPageList(MedicationRecordBo bo, PageQuery pageQuery);

    /**
     * 查询药历首页信息列表
     */
    List<MedicationRecordVo> queryList(MedicationRecordBo bo);

    /**
     * 新增药历首页信息
     */
    R<Void> insertByBo(MedicationRecordBo bo);

    /**
     * 修改药历首页信息
     */
    Boolean updateByBo(MedicationRecordBo bo);

    /**
     * 校验并批量删除药历首页信息信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 根据病历号查询药历详情
     *
     * @param medicalRecordNo 病历号
     * @return
     */
    MedicationRecordVo queryByMedicalRecordNo(Integer medicalRecordNo);

    /**
     * 导出电子药历
     *
     * @param medicalRecordNo 病历号
     */
    void exportWord(HttpServletResponse response, Integer medicalRecordNo);

    /**
     * 导出全面电子药历
     *
     * @param response
     * @param medicalRecordNo 病历号
     */
    void overallWord(HttpServletResponse response, Integer medicalRecordNo);
}
